<?php defined('SYSPATH') or die('No direct script access.');

//资讯首页
Route::set('news_index_mobile', 'news(/)', array())->defaults(array(
    'action' => 'index',
    'controller' => 'news',
    'directory' => 'mobile'
));

//资讯详情
Route::set('news_show_mobile', 'news(/(show_)<aid>.html)', array(
    'aid' => '\d+',
    'action' => 'show'
))->defaults(array(
    'action' => 'show',
    'controller' => 'news',
    'directory' => 'mobile'
));

//资讯列表
Route::set('news_list_mobile', 'news/<categoryid>(-<p>)',
    array(

        'categoryid' => '[0-9]+',
        'p' => '[0-9]+'
    ))
    ->defaults(array(
        'action' => 'list',
        'controller' => 'news',
        'directory' => 'mobile'
    ));

//资讯其它路由规则
Route::set('news_other_mobile', 'news(/<action>(/<params>))', array('params' => '.*'))
    ->defaults(array(
        'action' => 'index',
        'controller' => 'news',
        'directory' => 'mobile'
    ));